<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<link href="{$pathStatic}/bootstrap/5.3.2/css/bootstrap.min.css?{:config('app.app_version')}" rel="stylesheet">
<link href="{$pathStatic}/iconfont/1.0.1/iconfont.css?{:config('app.app_version')}" rel="stylesheet">
<link href="{$pathView}/back.css?{:config('app.app_version')}" rel="stylesheet">
<link href="{$pathView}/{$module}/{$controll}/{$action}.css?{:config('app.app_version')}" rel="stylesheet">
<script>const CONFIG = {:json_encode($jsConfig)}</script>
<script src="{$pathStatic}/require/2.3.6/require.min.js?{:config('app.app_version')}" data-main="{$pathView}/back.js?{:config('app.app_version')}"></script>
{block name="head"}<title>{:lang($module.'/'.$controll.'/'.$action)}－{:lang('app_name')}</title>{/block}
</head>
<body>
<nav class="navbar navbar-expand-sm navbar-dark bg-dark fixed-top">
  <div class="container-fluid">
    <a class="navbar-brand ms-1" href="{:dcUrl('admin/index/index')}">
      <i class="iconfont icon-cube"></i>
      <span>{:lang('app_name')}</span>
    </a>
    <ul class="navbar-nav ml-auto flex-row flex-wrap">
      <li class="nav-item">
        <a class="nav-link" href="{:dcUrl('admin/index/index')}" target="_self"><i class="fs-7 iconfont icon-cog me-1"></i>后台首页</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="{:dcUrl('index/index/index')}" target="_blank"><i class="fs-7 iconfont icon-home me-1"></i>网站前台</a>
      </li>
      <li class="nav-item">
        <a class="nav-link" href="{:dcUrl('admin/logout/index')}" target="_self"><i class="fs-7 iconfont icon-home me-1"></i>安全退出</a>
      </li>
    </ul>
  </div>
</nav>
<main class="row mx-0">
  <div class="col-left">
    <div class="accordion accordion-flush" id="siteBars">
      {volist name=":config('backSitebar.')" id="item"}
      <div class="accordion-item">
        <button class="accordion-button {:dcDefault($module.'/'.$controll,$item['active'],'','collapsed')}" type="button" data-bs-toggle="collapse" data-bs-target="#flush-{$i}" aria-expanded="false" aria-controls="flush-{$i}">
          <i class="me-2 fw-bold {$item.icon|default='iconfont icon-list'}"></i>
          <span>{$item.name}</span>
        </button>
        <div class="accordion-collapse collapse {:dcDefault($module.'/'.$controll,$item['active'],'show')}" id="flush-{$i}" data-bs-parent="#siteBars">
          {foreach $item['_child'] as $key=>$value}
          <div class="accordion-body">
            <a class="fs-7 {:dcDefault($module.'/'.$controll.'/'.$action,$value['active'],'text-primary')}" href="{:dcUrl($value['link'])}" target="{$value.target}">{$value.name}</a>
          </div>
          {/foreach}
        </div>
      </div>
      {/volist}
    </div>
  </div>
  <div class="col-right col position-relative pt-3 pe-4">
    {block name="main"}{/block}
  </div>
</main>
</body>
</html>